package com.example.springblog.model;

import com.example.springblog.utils.DateUtils;
import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;

import static com.example.springblog.utils.DateUtils.dateFormat;

@Data
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
    private boolean isLoginUser;

    public String getCreateTime(){//注意这里的方法的名字（重写方法）
        //return dateFormat(createTime);
        return DateUtils.dateFormat(createTime);
    }


}
